﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PosHacker.Form
{
    public class FormMark
    {
        public FormMark() { }
        public FormMark(string pIndex,
                        string pQuestionId,
            string pPaperRegNo,
            string pAllocatedPoint,
            string pImage,
            string pStudentNo)
        {
            this.index = pIndex;
            this.questionId = pQuestionId;
            this.paperRegNo = pPaperRegNo;
            this.allocatedPoint = pAllocatedPoint;
            this.image = pImage;
            this.studentNo = pStudentNo;
        }

        //mark = new Mark;
        public string index { get; set; }
        public string questionId { get; set; }
        public string paperRegNo { get; set; }
        public string allocatedPoint { get; set; }
        public string image { get; set; }
        public string studentNo { get; set; }


        public string ToJson() {

            string tmpStr = "";
            tmpStr += "{";

            tmpStr += "\"index\":\"";
            tmpStr += this.index;
            tmpStr += "\",";

            tmpStr += "\"questionId\":\"";
            tmpStr += this.questionId;
            tmpStr += "\",";

            tmpStr += "\"paperRegNo\":\"";
            tmpStr += this.paperRegNo;
            tmpStr += "\",";

            tmpStr += "\"allocatedPoint\":\"";
            tmpStr += this.allocatedPoint;
            tmpStr += "\",";

            tmpStr += "\"image\":\"";
            tmpStr += this.image;
            tmpStr += "\",";

            tmpStr += "\"studentNo\":\"";
            tmpStr += this.studentNo;
            
            tmpStr += "\"}";


            return tmpStr;
        }


    }
}
